import { eventHandler, getRouterParam } from "h3";

export default eventHandler((event) => {
  const id = getRouterParam(event, "id");

  return {
    message: `这是动态路由，ID参数是: ${id}`,
    path: event.node.req.url,
    type: "dynamic route",
    parameter: {
      id: id,
    },
  };
});
